﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AG.Data
{
    public class AGData
    {
        public List<AGModelCategory> ModelCategoryList { get; set; }
        public List<AGModel> ModelList { get; set; }
        public List<AGTerrain> TerrainList { get; set; }
        public List<AGUnitCategory> UnitCategoryList { get; set; }
        public List<AGUnit> UnitList { get; set; }
        public List<AGMapObjectCategory> ObjectCategoryList { get; set; }

        public AGData()
        {
            ModelCategoryList = new List<AGModelCategory>();
            ModelList = new List<AGModel>();
            TerrainList = new List<AGTerrain>();
            UnitCategoryList = new List<AGUnitCategory>();
            UnitList = new List<AGUnit>();
            ObjectCategoryList = new List<AGMapObjectCategory>();
        }

        public AGTerrain GetTerrain(byte terrainId)
        {
            for (int index = 0; index < TerrainList.Count; index++)
            {
                if (TerrainList[index].Id == terrainId)
                {
                    return TerrainList[index];
                }
            }
            return null;
        }
    }
}
